<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        canvas {
            border: 1px solid black;
        }
    </style>
</head>

<body>
    <canvas width=500 height=800></canvas>

    <script>
        var canvas = document.getElementsByTagName("canvas")[0];
        var ctx = canvas.getContext("2d");
        ctx.lineWidth = 1;

        ctx.strokeStyle = "#000000";
        ctx.beginPath();
        ctx.arc(250, 200, 100, 1, 0.69 * Math.PI, true);
        ctx.stroke();

        ctx.beginPath();
        ctx.arc(200, 170, 20, 1, 3 * Math.PI);
        ctx.stroke();

        ctx.beginPath();
        ctx.arc(300, 170, 20, 1, 3 * Math.PI);
        ctx.stroke();

        ctx.beginPath();
        ctx.arc(250, 390, 120, -0.35 * Math.PI, 1.35 * Math.PI);
        ctx.stroke();

        ctx.beginPath();
        ctx.moveTo(194, 283);
        ctx.lineTo(304, 283);
        ctx.stroke();

        ctx.beginPath();
        ctx.arc(250, 305, 20, 1, 3 * Math.PI);
        ctx.stroke();

        ctx.beginPath();
        ctx.arc(250, 308, 5, 1, 3 * Math.PI);
        ctx.stroke();
        ctx.beginPath();
        ctx.moveTo(232, 295);
        ctx.lineTo(268, 295);
        ctx.stroke();
        ctx.beginPath();
        ctx.moveTo(250, 312);
        ctx.lineTo(250, 326);
        ctx.stroke();


        ctx.beginPath();
        ctx.arc(250, 400, 60, 0, 1 * Math.PI);
        ctx.stroke();
        ctx.beginPath();
        ctx.moveTo(190, 400);
        ctx.lineTo(310, 400);
        ctx.stroke();

        ctx.beginPath();
        ctx.moveTo(250, 215);
        ctx.lineTo(250, 258);
        ctx.stroke();
        ctx.beginPath();
        ctx.arc(250, 200, 60, 0.25 * Math.PI, 0.75 * Math.PI);
        ctx.stroke();

        ctx.beginPath();
        ctx.arc(112, 308, 40, 1, 3 * Math.PI);
        ctx.stroke();
        ctx.beginPath();
        ctx.arc(388, 308, 40, 1, 3 * Math.PI);
        ctx.stroke();
        ctx.beginPath();
        ctx.arc(112, 470, 40, 1, 3 * Math.PI);
        ctx.stroke();
        ctx.beginPath();
        ctx.arc(388, 470, 40, 1, 3 * Math.PI);
        ctx.stroke();




        //把当前路径绘制出来
        //ctx.beginPath() 创建一条新路径
    </script>
</body>

</html>